Skip to content

Conversation

@ZDahir
Copy link

@ZDahir ZDahir commented Feb 10, 2026

Why are these changes introduced?

This PR adds support for cart line properties in tax calculation extensions. As part of the Tax Platform API enhancements project, tax partners can now include cart line properties in their calculation requests.

This update ensures that these properties are correctly persisted and not dropped from the .toml configuration during CLI deployments. We use the properties in this toml to determine what properties we send.

WHAT is this pull request doing?

  • Schema Update: Added the cart_line_properties field to the tax calculation extension schema.
  • Validation: Implemented CartLinePropertySchema to enforce valid key-value structures.
  • Configuration Logic: Updated the extension loader to recognize and process line properties.
  • Testing: Added unit tests to verify schema validation and deployment persistence.

How to test your changes?

  1. Initialize: Create or navigate to an existing tax calculation extension.
  2. Configure: Add a custom property to your extension.toml file:
    [[cart_line_properties]]
    key = "_use_vip_token"
  3. Deploy/Preview: Run the CLI deploy command and verify that the configuration loads successfully without validation errors or field stripping.

The CLI was silently dropping cart_line_properties during deploy because
the field was missing from both the zod schema and the deployConfig
output. The server-side already fully supports cart_line_properties as a
first-class field with its own validation and feature flag gating.

This adds a CartLinePropertySchema and includes cart_line_properties in
the schema and deploy config so TOML entries are parsed and sent to the
server.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Author

ZDahir commented Feb 10, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 79.63% 14486/18191
🟡 Branches 73.92% 7176/9708
🟡 Functions 79.78% 3692/4628
🟡 Lines 79.99% 13697/17123

Test suite run success

3721 tests passing in 1441 suites.

Report generated by 🧪jest coverage report action from 295f070

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ZDahir ZDahir marked this pull request as ready for review February 10, 2026 18:02
@ZDahir ZDahir requested a review from a team as a code owner February 10, 2026 18:02
@github-actions
Copy link
Contributor

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

Caution

DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

Copy link

@xuyuanx xuyuanx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm except for one open question

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants